<!DOCTYPE html>
<html lang="en">
{include file="admin/public_css" /}
<body>
{include file="admin/header" /}
{css href='__ROOT__/public/static/css/upload.css' /}

<div class="main-container" id="main-container">
    <script type="text/javascript">
        try{ace.settings.check('main-container' , 'fixed')}catch(e){}
    </script>

    <div class="main-container-inner">
        <a class="menu-toggler" id="menu-toggler" href="#">
            <span class="menu-text"></span>
        </a>

        {include file="admin/sidebar" /}

        <div class="main-content">
            <div class="breadcrumbs" id="breadcrumbs">
                <script type="text/javascript">
                    try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
                </script>

                <ul class="breadcrumb">
                    <li>
                        <i class="icon-home home-icon"></i>
                        <a href="__ROOT__/admin/index">首页</a>
                    </li>
                    <li class="active">{:v('headtitle')}</li>
                </ul><!-- .breadcrumb -->

                <div class="nav-search" id="nav-search">
                    <form class="form-search">
                        <span class="input-icon">
                            <input type="text" placeholder="Search ..." class="nav-search-input" id="nav-search-input" autocomplete="off" />
                            <i class="icon-search nav-search-icon"></i>
                        </span>
                    </form>
                </div><!-- #nav-search -->
            </div>

            <div class="page-content">
                <div class="row">
                    {eq name='active.url' value='Index/index'}
                    <div class="col-xs-12">
                        <div class="alert alert-block alert-success">
                            <button type="button" class="close" data-dismiss="alert">
                                <i class="icon-remove"></i>
                            </button>
                            <i class="icon-ok green"></i>
                            护肤品管理后台
                        </div>
                    </div>
                    {/eq}

                    <div class="col-xs-12">
                        <div class="page-header">
                            <h1>{:v('headtitle')}</h1>
                        </div>
                        <form class="form-horizontal" id="form" onsubmit="false" role="form" action="{:url('update')}">
                            <div class="form-group">
                                <label class="col-sm-3 control-label no-padding-right"> 产品名 </label>

                                <div class="col-sm-9">
                                    <input type="text" name="p_name" class="col-xs-10 col-sm-5" value="{$res.p_name}" data-rule="*" data-errmsg="产品名不可为空"/>
                                    <span class="help-inline col-xs-12 col-sm-7">
                                        <span class="middle">不可为空</span>
                                    </span>
                                </div>
                            </div>
                            <div class="space-4"></div>

                            <div class="form-group">
                                <label class="col-sm-3 control-label no-padding-right"> 价格 </label>

                                <div class="col-sm-9">
                                    <input type="text" name="p_price" class="col-xs-10 col-sm-5" value="{$res.p_price}" data-rule="*" data-errmsg="价格不可为空"/>
                                </div>
                            </div>
                            <div class="space-4"></div>

                            <div class="form-group">
                                <label class="col-sm-3 control-label no-padding-right"> 产品图 </label>

                                <div class="col-sm-9">
                                    <div class="upload-list">
                                        <div class="old">
                                            <input type="hidden" name="p_photo" value="{$res.p_photo}" />
                                            <img src="__ROOT__/public/uploads/{$res.p_photo}" width="100px"/>
                                            <span class="deleteImage">修改</span>
                                        </div>
                                    </div>
                                    <div class="upload-plus" data-field="head" data-upurl="{:url('index/upload')}" data-multiple="false">
                                        <i class="icon-cloud-upload"></i>
                                    </div>
                                </div>
                            </div>
                            <div class="space-4"></div>

                            <div class="form-group">
                                <label class="col-sm-3 control-label no-padding-right"> 产品类型 </label>

                                <div class="col-sm-9">
                                    <label>
                                        <input type="radio" name="p_type" {eq name='res.p_type' value='2'}checked="checked"{/eq} value="2">套装&nbsp;
                                        <input type="radio" name="p_type" {eq name='res.p_type' value='1'}checked="checked"{/eq} value="1">免费领取
                                    </label>
                                </div>
                            </div>

                            <!-------------------修改id-------------------->
                            <input type="hidden" name="id" value="{$res.id}" />

                            <div class="col-md-offset-3 col-md-9">
                                <button class="btn btn-info" type="button" id="submit">
                                    <i class="icon-ok bigger-110"></i>
                                    修改
                                </button>

                                <button class="btn" type="reset">
                                    <i class="icon-undo bigger-110"></i>
                                    清空
                                </button>
                            </div>
                        </form>
                    </div>

                </div>
            </div>
        </div>
    </div>
    {include file="admin/settings-container" /}
</div>

<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
    <i class="icon-double-angle-up icon-only bigger-110"></i>
</a>
</div>
{include file="admin/public_js" /}
{js href="http://cdn.bootcss.com/webuploader/0.1.1/webuploader.min.js" /}
{js href="__ROOT__/public/static/js/uploader.js" /}
</body>

</html>